<table id="rolesList">
<thead>
<tr id="tr_0">
	<th colspan="2">角色列表</th>
	<td colspan="3"><a id="linkRoleCreate" href="#">添加新角色</a></td>
</tr>
</thead>
<tr id="headline">
	<th>角色名称</th>
	<th>说明</th>
	<th colspan="3">操作</th>
</tr>
{{ section name=i loop=$rolesList }}
<tr id="tr_{{ $rolesList[i].role_id }}">
	<td>{{ $rolesList[i].rolename }}</td>
	<td>{{ $rolesList[i].description }}</td>
	<td><a href="#" onclick="roleUpdate( {{ $rolesList[i].role_id }}, '{{ $rolesList[i].rolename }}', '{{ $rolesList[i].description }}' );">修改</a></td>
	<td><a class="linkRoleRemove" role_id="{{ $rolesList[i].role_id }}" href="#">删除</a></td>
	<td><a href="?controller=admin_roles&action=band&role_id={{ $rolesList[i].role_id }}">绑定</a></td>
</tr>
{{ /section }}

</table>

<!-- 修改角色的表单/隐藏状态 -->
<div id="divRoleCRUD" class='hideme'>

<form id="formRoleUpdate" action="?controller=admin_roles&action=roleupdate" method="POST">
	<table>
		<tr>
			<th>ID:</th>
			<td>
				<input id='u_role_id' name='role_id' type='text' readonly='readonly' size='4' /> * 不可修改
			</td>
		</tr>
		<tr>
			<th>角色名称:</th>
			<td>
				<input id='u_rolename' name='rolename' type='text' size='20' class='required' 
				title='角色名称不能为空' alt="{event: 'blur'}" maxlength="16"/>
			</td>
		</tr>
		<tr>
			<th>角色说明:</th>
			<td>
				<input id='u_description' name='description' type='text' size='20' class='required' 
				title='角色说明不能为空' alt="{event: 'blur'}" maxlength="16"/>
			</td>
		</tr>
		<tr>
			<th></th>
			<td>
				<input type='submit' value='修改' class='submitbutton' />
				<input type='button' value='取消' class='submitbutton' onclick='_removeModifyForm();' />
			</td>
		</tr>
	</table>
</form>

<form id="formRoleCreate" action="?controller=admin_roles&action=rolecreate" method="POST">
	<table>
		<tr>
			<th>角色名称:</th>
			<td>
				<input id='c_rolename' name='rolename' type='text' size='20' class='required' 
				title='角色名称不能为空' alt="{event: 'blur'}" maxlength="16"/>
			</td>
		</tr>
		<tr>
			<th>角色说明:</th>
			<td>
				<input id='c_description' name='description' type='text' size='20' class='required' 
				title='角色说明不能为空' alt="{event: 'blur'}" maxlength="16"/>
			</td>
		</tr>
		<tr>
			<th></th>
			<td>
				<input type='submit' value='创建新角色' class='submitbutton' />
				<input type='button' value='取消' class='submitbutton' onclick='_removeModifyForm();' />
			</td>
		</tr>
	</table>
</form>

</div>



